package club.emergency.wechat.question_collection.search;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create with IntelliJ IDEA
 * Project Name: wechat
 * Package Name: club.emergency.wechat.question_collection.search
 * Date: 2019/2/21
 *
 * @author: 快乐的小菌菌
 * Description:
 */
public interface QuestionCollectionSearch {

    /**
     * 根据人员id查询该人员所有收藏的试题
     *
     * @param staffId       人员id
     * @param categoryAlias 试题分类别名
     * @param pageNo        当前页
     * @param pageSize      页面显示数据数量
     * @return 以字符串形式返回
     */
    @PostMapping("/question-collection-search-provider/flipListByStaffId")
    String flipListByStaffId(
            @RequestParam("staffId") Long staffId,
            @RequestParam(value = "categoryAlias", required = false) String categoryAlias,
            @RequestParam("pageNo") Integer pageNo,
            @RequestParam("pageSize") Integer pageSize
    );

    /**
     * 根据人员id和试题id检查是否被收藏
     *
     * @param staffId    人员id
     * @param questionId 试题id
     * @return 以字符串形式返回
     */
    @PostMapping("/question-collection-search-provider/checkIsCollection")
    String checkIsCollection(@RequestParam("staffId") Long staffId, @RequestParam("questionId") Long questionId);

}
